interface Rule {
  urlType: number;
  value: number | string;
  image: string;
  name: string;
  showPosition: number[];
}
// 弹窗广告活动创建
export interface ActivityFormList {
  name: string;
  id?: number;
  activityType?: number;
  code: string;
  desc: string;
  type: number;
  promotionType: number;
  rule: Rule;
  validityRange: any[];
  path: string;
  key?: string | number | Rule | any[];
  gradeType: number;
  // storeType: 0,
  gradeList: any[];
  isNonMember: boolean;
  isMember: boolean;
  prioritySortId: number;
}

interface RecommendMatchList {
  payGoods: [];
  recommendList: [];
}

export interface FormData {
  type: number;
  date: String[];
  isDate: number;
  recommendMatchList: RecommendMatchList;
}

// 菜品推荐活动创建

interface RecommendRule {
  mainFoodList: {
    foodId: number;
    foodSpecId: string;
    name: string;
  }[];
  recommendList: {
    foodId: number;
    foodSpecId: string;
    name: string;
  }[];
}

interface List {
  list: RecommendRule[];
}
export interface recommendFormList {
  path: string;
  name: string;
  id?: number;
  // activityType?: number;
  code: string;
  desc: string;
  type: number; // 菜品推荐6
  rule: List; //{ mainFood[{};{}] 主菜对象 recommend[{}{}] 推荐对象}
  cycleType: number; //  0.每天；1.周（周一至周日);2.月（1-31号)
  cycleValue: number | void[];
  validityRange: any[];
  promotionType: number; // 1营销活动 2餐饮促销活动
}

// 超值换购
interface IncreaseList {
  foodSpecId: number;
  activityPrice: string;
  limit: number;
  sort: number;
  id?: number;
  name: string;
}
interface ExchangeRule {
  conditionType: number;
  conditionValue: string;
  selectType: number;
  selectIds: number[];
  inCreaseList: IncreaseList[];
  selectList?: any[];
}
export interface ExchangeList {
  path: string;
  id?: number;
  name: string;
  code: string;
  type: number;
  desc: string;
  rule: ExchangeRule;
  cycleType: number;
  cycleValue: number[];
  validityRange: string[];
  promotionType: number;
}

// 消费满额赠好礼活动限次
export interface activityQuantityType {
  name: string;
  value: number;
  type: boolean;
  prop: string;
  isName: string;
}
interface ConsumerList {
  amount: number;
  giftAmount: number;
  isGiftAmount: boolean;
  isGiftCoupon: boolean;
  isGiftPoint: boolean;
  pointType: number;
  pointValue: number;
  couponList: { id: number; count: number; name: string; promotionId: number; sort: number }[];
}
interface ConsumerRule {
  ruleType: number; // 1是消费满额赠可选多个规则 2 消费每满赠送只能赠送
  list: ConsumerList[];
}
export interface ConsumerForm {
  id: number;
  remark: string;
  path: string;
  name: string;
  code: string;
  type: number;
  validityRange: string[];
  cycleValue: number[];
  cycleType: number;
  rule: ConsumerRule;
  isTotal: boolean;
  total: number;
  isUserDayStock: boolean;
  userDayStock: number;
  isUserTotal: boolean;
  userTotal: number;
  desc?: string;
  gradeType: number; // 适用会员
  gradeList: number[]; // 会员等级列表
  // storeType: number;
  // storeList: number[];
  promotionType: number; // 1.营销活动 2.餐饮促销活动
  [key: string]: boolean | number | string | ConsumerRule | string[] | number[] | undefined;
}

export interface DataType {
  value: number;
  label: string;
}
